
/**
 * 
 * The Planet object contains all info on whether a planet has been discovered/visited and where it is located.
 *
 */
public class Planet extends BaphiListItem {

	private int location;
	private boolean discovered;
	private int discoveredBy;
	private boolean visited[];	
	private boolean droneable[];
	
	/**
	 * The Planet object contains all info on whether a planet has been discovered/visited and where it is located.
	 * @param name
	 * @param location
	 * @param numPlayers
	 */
	public Planet(String name, int location, int numPlayers)
	{
		this.name = name;
		this.location = location;
		discovered = false;
		visited = new boolean[numPlayers];
		droneable = new boolean[numPlayers];
	}
	
	/**
	 * 
	 * @return location of planet
	 */
	public int getLocation()
	{
		return location;
	}
	
	/**
	 * 
	 * @return true if the planet has been discovered
	 */
	public boolean isDiscovered()
	{
		return discovered;
	}
	
	/**
	 * 
	 * @return Player list offset of person who discovered the planet
	 */
	public int getDiscoverer()
	{
		return discoveredBy;
	}
	
	/**
	 * 
	 * @param player
	 * @return true if the specified player has visited the planet
	 */
	public boolean isVisited(int player)
	{
		return visited[player];
	}

	/**
	 * 
	 * @param player
	 * @return
	 */
	public boolean isDroneable(int player)
	{
		return droneable[player];
	}
}
